package com.yxinsur.imc.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxinsur.imc.business.domain.ImcSupplierExpense;
import com.yxinsur.imc.business.vo.ImcSupplierExpenseVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 供应商-费用科目Mapper接口
 *
 * @author imc
 * @date 2021-07-29
 */
@Mapper
public interface ImcSupplierExpenseMapper extends BaseMapper<ImcSupplierExpense> {

    /**
     * 供应商费用科目-查询列表
     *
     * @param imcSupplierExpense 供应商-费用科目
     * @return 供应商-费用科目集合
     */
    List<ImcSupplierExpenseVo> selectImcSupplierExpenseList(ImcSupplierExpense imcSupplierExpense);

    /**
     * 根据{供应商Id}、{费用科目名称}查询供应商-费用科目
     *
     * @param repoSupplierId 供应商Id
     * @param expenseName    供应商费用科目名称
     * @param tenantId       用户Id
     * @return 供应商-费用科目
     */
    ImcSupplierExpense getImcSupplierExpenseByRepoSupplierIdAndExpenseName(@Param("repoSupplierId") Long repoSupplierId, @Param("expenseName") String expenseName, @Param("tenantId") Long tenantId);

    /**
     * 供应商费用科目-根据{Id}查询详情
     *
     * @param id 供应商-费用科目id
     * @return 供应商-费用科目
     */
    ImcSupplierExpense getImcSupplierExpenseById(@Param("id") Long id);

    /**
     * 新增供应商-费用科目
     *
     * @param imcSupplierExpense 供应商-费用科目
     * @return 结果
     */
    int insertImcSupplierExpense(ImcSupplierExpense imcSupplierExpense);

    /**
     * 修改供应商费用科目
     *
     * @param imcSupplierExpense 供应商-费用科目
     * @return 结果
     */
    int updateImcSupplierExpense(ImcSupplierExpense imcSupplierExpense);

    /**
     * 删除供应商-费用科目
     *
     * @param id 供应商-费用科目ID
     * @return 结果
     */
    int deleteImcSupplierExpenseById(String id);
}
